package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PWDemo {
    public static void main(String[] args) throws IOException {
        PrintWriter pw=new PrintWriter("zy.dat");
        pw.println("一份爱能承受多少的误解，熬过飘雪的冬天。");
        pw.println("一句话能撕裂多少的牵连，变得比陌生人还遥远。");
        System.out.println("写入成功");
        pw.close();



        /*
        FileOutputStream fos=new FileOutputStream("zy.dat");
        OutputStreamWriter osw=new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        BufferedWriter bw=new BufferedWriter(osw);

        bw.write("一份爱能承受多少的误解，熬过飘雪的冬天。");
        bw.write("一句话能撕裂多少的牵连，变得比陌生人还遥远。");
        System.out.println("写入成功");
        bw.close();

         */
    }
}
